#include <iostream>
#include <pthread.h>
using namespace std;

pthread_t t;

void *test(void *arg)
{
    int i = *(int *)arg;
    cout << "i=" << i << endl;
    return ((void *)0);
}

int main()
{
    int i = 10;
    pthread_create(&t, NULL, &test, &i);
    pthread_join(t, NULL);
    return 0;
}
